#include "DirectoryEntry.h"
#include <stdio.h>

DirectoryEntry::DirectoryEntry() {
    m_fcbBlockNumber = 0;
    m_name[0] = '\0';
}

DirectoryEntry::DirectoryEntry(const char * name) {
    m_fcbBlockNumber = 0;
    strcpy(m_name, name); 
    // strcpy copies the NULL. We copy out full contents of m_name to
    // disk, and thus we get the NULL on disk.
}

DirectoryEntry::~DirectoryEntry() {
}

void DirectoryEntry::SetFCB(int fcbNumber) {
    m_fcbBlockNumber = fcbNumber;
}


void DirectoryEntry::Output(bool newline) {
    printf("name: %s; FCB# = %d",
            m_name, m_fcbBlockNumber);
    if (newline) {
        printf("\n");
    }
}



